package com.shenhaofeng.app.http.request;

import java.io.File;


/**
 * Created by Administrator on 2016/10/13.
 */
public final class Entry {

    private String name;

    private String value;

    private String filename;

    private File file;

    private MediaType mediaType;

    private boolean isValue;

    private boolean isFile;


    public Entry(String name, String value) {
        this.name = name;
        this.value = value;
        isValue = true;
    }


    public Entry(String name, String filename, File file,MediaType mediaType) {
        this.name = name;
        this.filename = filename;
        this.file = file;
        this.mediaType=mediaType;
        isFile = true;
    }


    public boolean isValue() {
        return isValue;
    }


    public boolean isFile() {
        return isFile;
    }


    public String getName() {
        return name;
    }


    public String getValue() {
        return value;
    }


    public String getFilename() {
        return filename;
    }


    public MediaType getMediaType() {
        return mediaType;
    }


    public File getFile() {
        return file;
    }
}
